﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jayden.Dll.Web.Crawler
{
	public class WebCrawlerUri
	{
		private Uri m_Uri;
		private int m_Depth;

		public WebCrawlerUri(Uri uri, int depth = 0)
		{
			m_Uri = uri;
			m_Depth = depth;
		}

		public Uri Uri { get { return m_Uri; } }
		public int Depth { get { return m_Depth; } }

		public override bool Equals(object obj)
		{
			if(obj is WebCrawlerUri)
				return m_Uri.Equals((obj as WebCrawlerUri).m_Uri);
			return false;
		}
		public override int GetHashCode() { return m_Uri.GetHashCode(); }
		public override string ToString()
		{
			return string.Format("{0} (width depth {1})", m_Uri, m_Depth);
		}
	}
}
